Attribute VB_Name = "Event"
'############################################################################
'****************************************************************************
'              Copyright (C) 2000-3, Advantech Automation Corp.
'      THIS IS AN UNPUBLISHED WORK CONTAINING CONFIDENTIAL AND PROPRIETARY
'         INFORMATION WHICH IS THE PROHERTY OF ADVANTECH AUTOMATION CORP.
'
'   ANY DISCLOSURE, USE, OR REPRODUCTION, WITHOUT WRITTEN AUTHORIZATION FROM
'             ADVANTECH AUTOMATION CORP., IS STRICTLY PROHIBITED
'****************************************************************************
'############################################################################

' File:        EVENT.H
' Created:     01/08/2003
' Description: Event type definition headfile.
' ============================================================================
' VERSION HISTORY
' 01/08/2003  Create
' ============================================================================
' Notes:
' 1. Bit-mapped ID:
'    From 0x0001 to 0x0200 : defined at Driver.h, BIT-mapped Event ID.
'    From 0x0201 to 0x0205 : defined at Driver.h  ID-mapped Event ID.
'    From 0x0206 to 0x0fff : not used
'    From 0x1000 to 0xffff : defined at Event.h   ID-mapped Event ID.
'
' 2. Version 2.0A and before don't use Event.h.
'
' 3. EventID = 0x0000 is reserved for non event or error.
'    EventID = 0xffff is reserved for time out.
'
' 4. The sub event naming standard from 0x1000 to 0x6fff:
'      0x1000 ~ 0x1fff    for AI Event Group
'         0x1000 ~ 0x17ff for General AI Event ID
'         0x1800 ~ 0x18ff for AI others Event ID
'      0x2000 ~ 0x2fff    for AO Event Group
'         0x2000 ~ 0x27ff for General AO Event ID
'         0x2800 ~ 0x28ff for AO others Event ID
'      0x3000 ~ 0x3fff    for DI Event Group
'         0x3000 ~ 0x30ff for General DI Event ID
'         0x3400 ~ 0x34ff for General IDI Event ID
'         0x3800 ~ 0x3fff for others Event ID
'      0x4000 ~ 0x4fff for DO Event Group
'         0x4000 ~ 0x47ff for DO Gernal Event ID
'         0x4800 ~ 0x48ff for DO others Event ID
'      0x5000 ~ 0x5fff for Counter/Timer Event Group
'         0x5000 ~ 0x50ff for Counter TC Event ID
'         0x5100 ~ 0x51ff for counter OverFlow Event ID
'         0x5200 ~ 0x52ff for counter UnderFlow Event ID
'         0x5300 ~ 0x53ff for counter OverCompare Event ID
'         0x5400 ~ 0x54ff for counter UnderCompare Event ID
'         0x5500 ~ 0x55ff for General Timer Event ID
'         0x5800 ~ 0x58ff for Counter/Timer others Event ID
'      0x6000 ~ 0x6fff not used at Version 2.0B

'****************************************************************************
'    Constant Definition
'****************************************************************************

' ==================================
' 0x0000 and 0xffff
' ----------------------------------
Global Const ADS_EVT_NO_EVENT = &H0
Global Const ADS_EVT_TIME_OUT = &HFFFF

' ==================================
' 0x1000 ~ 0x1fff for AI Group
' ----------------------------------
'sub group 0x1800 ~ 0x18ff for AI others Event ID
Global Const ADS_EVT_AI_BUFFER1_FULL = &H1800
Global Const ADS_EVT_AI_BUFFER2_FULL = &H1801
                                                                                        
Global Const ADS_EVT_AI_BUFFER1_FULL_NAME = "ADS_EVT_AI_BUFFER1_FULL"
Global Const ADS_EVT_AI_BUFFER2_FULL_NAME = "ADS_EVT_AI_BUFFER2_FULL"

' ----------------------------------
' 0x2000 ~ 0x2fff for AO Group
' ----------------------------------
' sub group 0x2000 ~ 0x27ff for AO General ID

' sub group 0x2800 ~ 0x28ff for AO oters Event ID
Global Const ADS_EVT_AO_BUFFER1_EMPTY = &H2800
Global Const ADS_EVT_AO_BUFFER2_EMPTY = &H2801
Global Const ADS_EVT_AO_INTERRUPT = &H2802
Global Const ADS_EVT_AO_BUFCHANGE = &H2803
Global Const ADS_EVT_AO_TERMINATED = &H2804
Global Const ADS_EVT_AO_UNDERRUN = &H2805
Global Const ADS_EVT_AO_HIBUF_TRANSFERED = &H2806
Global Const ADS_EVT_AO_LOBUF_TRANSFERED = &H2807
                                                                                             
Global Const ADS_EVT_AO_BUFFER1_EMPTY_NAME = "ADS_EVT_AO_BUFFER1_EMPTY"
Global Const ADS_EVT_AO_BUFFER2_EMPTY_NAME = "ADS_EVT_AO_BUFFER2_EMPTY"

' ----------------------------------
' 0x3000 ~ 0x3fff for DI Group
' ----------------------------------
' sub group 0x3000 ~ 0x30ff for DI General ID
Global Const ADS_EVT_INTERRUPT_DI0 = &H3000
Global Const ADS_EVT_INTERRUPT_DI1 = (ADS_EVT_INTERRUPT_DI0 + 1)
Global Const ADS_EVT_INTERRUPT_DI2 = (ADS_EVT_INTERRUPT_DI0 + 2)
Global Const ADS_EVT_INTERRUPT_DI3 = (ADS_EVT_INTERRUPT_DI0 + 3)
Global Const ADS_EVT_INTERRUPT_DI4 = (ADS_EVT_INTERRUPT_DI0 + 4)
Global Const ADS_EVT_INTERRUPT_DI5 = (ADS_EVT_INTERRUPT_DI0 + 5)
Global Const ADS_EVT_INTERRUPT_DI6 = (ADS_EVT_INTERRUPT_DI0 + 6)
Global Const ADS_EVT_INTERRUPT_DI7 = (ADS_EVT_INTERRUPT_DI0 + 7)
 
'/////////////////////2.2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Global Const ADS_EVT_INTERRUPT_DI8 = (ADS_EVT_INTERRUPT_DI0 + 8)
Global Const ADS_EVT_INTERRUPT_DI9 = (ADS_EVT_INTERRUPT_DI0 + 9)
Global Const ADS_EVT_INTERRUPT_DI10 = (ADS_EVT_INTERRUPT_DI0 + 10)
Global Const ADS_EVT_INTERRUPT_DI11 = (ADS_EVT_INTERRUPT_DI0 + 11)
Global Const ADS_EVT_INTERRUPT_DI12 = (ADS_EVT_INTERRUPT_DI0 + 12)
Global Const ADS_EVT_INTERRUPT_DI13 = (ADS_EVT_INTERRUPT_DI0 + 13)
Global Const ADS_EVT_INTERRUPT_DI14 = (ADS_EVT_INTERRUPT_DI0 + 14)
Global Const ADS_EVT_INTERRUPT_DI15 = (ADS_EVT_INTERRUPT_DI0 + 15)

Global Const ADS_EVT_INTERRUPT_DI16 = (ADS_EVT_INTERRUPT_DI0 + 16)
Global Const ADS_EVT_INTERRUPT_DI17 = (ADS_EVT_INTERRUPT_DI0 + 17)
Global Const ADS_EVT_INTERRUPT_DI18 = (ADS_EVT_INTERRUPT_DI0 + 18)
Global Const ADS_EVT_INTERRUPT_DI19 = (ADS_EVT_INTERRUPT_DI0 + 19)
Global Const ADS_EVT_INTERRUPT_DI20 = (ADS_EVT_INTERRUPT_DI0 + 20)
Global Const ADS_EVT_INTERRUPT_DI21 = (ADS_EVT_INTERRUPT_DI0 + 21)
Global Const ADS_EVT_INTERRUPT_DI22 = (ADS_EVT_INTERRUPT_DI0 + 22)
Global Const ADS_EVT_INTERRUPT_DI23 = (ADS_EVT_INTERRUPT_DI0 + 23)

Global Const ADS_EVT_INTERRUPT_DI24 = (ADS_EVT_INTERRUPT_DI0 + 24)
Global Const ADS_EVT_INTERRUPT_DI25 = (ADS_EVT_INTERRUPT_DI0 + 25)
Global Const ADS_EVT_INTERRUPT_DI26 = (ADS_EVT_INTERRUPT_DI0 + 26)
Global Const ADS_EVT_INTERRUPT_DI27 = (ADS_EVT_INTERRUPT_DI0 + 27)
Global Const ADS_EVT_INTERRUPT_DI28 = (ADS_EVT_INTERRUPT_DI0 + 28)
Global Const ADS_EVT_INTERRUPT_DI29 = (ADS_EVT_INTERRUPT_DI0 + 29)
Global Const ADS_EVT_INTERRUPT_DI30 = (ADS_EVT_INTERRUPT_DI0 + 30)
Global Const ADS_EVT_INTERRUPT_DI31 = (ADS_EVT_INTERRUPT_DI0 + 31)

Global Const ADS_EVT_INTERRUPT_DI32 = (ADS_EVT_INTERRUPT_DI0 + 32)
Global Const ADS_EVT_INTERRUPT_DI33 = (ADS_EVT_INTERRUPT_DI0 + 33)
Global Const ADS_EVT_INTERRUPT_DI34 = (ADS_EVT_INTERRUPT_DI0 + 34)
Global Const ADS_EVT_INTERRUPT_DI35 = (ADS_EVT_INTERRUPT_DI0 + 35)
Global Const ADS_EVT_INTERRUPT_DI36 = (ADS_EVT_INTERRUPT_DI0 + 36)
Global Const ADS_EVT_INTERRUPT_DI37 = (ADS_EVT_INTERRUPT_DI0 + 37)
Global Const ADS_EVT_INTERRUPT_DI38 = (ADS_EVT_INTERRUPT_DI0 + 38)
Global Const ADS_EVT_INTERRUPT_DI39 = (ADS_EVT_INTERRUPT_DI0 + 39)

Global Const ADS_EVT_INTERRUPT_DI40 = (ADS_EVT_INTERRUPT_DI0 + 40)
Global Const ADS_EVT_INTERRUPT_DI41 = (ADS_EVT_INTERRUPT_DI0 + 41)
Global Const ADS_EVT_INTERRUPT_DI42 = (ADS_EVT_INTERRUPT_DI0 + 42)
Global Const ADS_EVT_INTERRUPT_DI43 = (ADS_EVT_INTERRUPT_DI0 + 43)
Global Const ADS_EVT_INTERRUPT_DI44 = (ADS_EVT_INTERRUPT_DI0 + 44)
Global Const ADS_EVT_INTERRUPT_DI45 = (ADS_EVT_INTERRUPT_DI0 + 45)
Global Const ADS_EVT_INTERRUPT_DI46 = (ADS_EVT_INTERRUPT_DI0 + 46)
Global Const ADS_EVT_INTERRUPT_DI47 = (ADS_EVT_INTERRUPT_DI0 + 47)

Global Const ADS_EVT_INTERRUPT_DI48 = (ADS_EVT_INTERRUPT_DI0 + 48)
Global Const ADS_EVT_INTERRUPT_DI49 = (ADS_EVT_INTERRUPT_DI0 + 49)
Global Const ADS_EVT_INTERRUPT_DI50 = (ADS_EVT_INTERRUPT_DI0 + 50)
Global Const ADS_EVT_INTERRUPT_DI51 = (ADS_EVT_INTERRUPT_DI0 + 51)
Global Const ADS_EVT_INTERRUPT_DI52 = (ADS_EVT_INTERRUPT_DI0 + 52)
Global Const ADS_EVT_INTERRUPT_DI53 = (ADS_EVT_INTERRUPT_DI0 + 53)
Global Const ADS_EVT_INTERRUPT_DI54 = (ADS_EVT_INTERRUPT_DI0 + 54)
Global Const ADS_EVT_INTERRUPT_DI55 = (ADS_EVT_INTERRUPT_DI0 + 55)

Global Const ADS_EVT_INTERRUPT_DI56 = (ADS_EVT_INTERRUPT_DI0 + 56)
Global Const ADS_EVT_INTERRUPT_DI57 = (ADS_EVT_INTERRUPT_DI0 + 57)
Global Const ADS_EVT_INTERRUPT_DI58 = (ADS_EVT_INTERRUPT_DI0 + 58)
Global Const ADS_EVT_INTERRUPT_DI59 = (ADS_EVT_INTERRUPT_DI0 + 59)
Global Const ADS_EVT_INTERRUPT_DI60 = (ADS_EVT_INTERRUPT_DI0 + 60)
Global Const ADS_EVT_INTERRUPT_DI61 = (ADS_EVT_INTERRUPT_DI0 + 61)
Global Const ADS_EVT_INTERRUPT_DI62 = (ADS_EVT_INTERRUPT_DI0 + 62)
Global Const ADS_EVT_INTERRUPT_DI63 = (ADS_EVT_INTERRUPT_DI0 + 63)

Global Const ADS_EVT_INTERRUPT_DI64 = (ADS_EVT_INTERRUPT_DI0 + 64)
Global Const ADS_EVT_INTERRUPT_DI65 = (ADS_EVT_INTERRUPT_DI0 + 65)
Global Const ADS_EVT_INTERRUPT_DI66 = (ADS_EVT_INTERRUPT_DI0 + 66)
Global Const ADS_EVT_INTERRUPT_DI67 = (ADS_EVT_INTERRUPT_DI0 + 67)
Global Const ADS_EVT_INTERRUPT_DI68 = (ADS_EVT_INTERRUPT_DI0 + 68)
Global Const ADS_EVT_INTERRUPT_DI69 = (ADS_EVT_INTERRUPT_DI0 + 69)
Global Const ADS_EVT_INTERRUPT_DI70 = (ADS_EVT_INTERRUPT_DI0 + 70)
Global Const ADS_EVT_INTERRUPT_DI71 = (ADS_EVT_INTERRUPT_DI0 + 71)

Global Const ADS_EVT_INTERRUPT_DI72 = (ADS_EVT_INTERRUPT_DI0 + 72)
Global Const ADS_EVT_INTERRUPT_DI73 = (ADS_EVT_INTERRUPT_DI0 + 73)
Global Const ADS_EVT_INTERRUPT_DI74 = (ADS_EVT_INTERRUPT_DI0 + 74)
Global Const ADS_EVT_INTERRUPT_DI75 = (ADS_EVT_INTERRUPT_DI0 + 75)
Global Const ADS_EVT_INTERRUPT_DI76 = (ADS_EVT_INTERRUPT_DI0 + 76)
Global Const ADS_EVT_INTERRUPT_DI77 = (ADS_EVT_INTERRUPT_DI0 + 77)
Global Const ADS_EVT_INTERRUPT_DI78 = (ADS_EVT_INTERRUPT_DI0 + 78)
Global Const ADS_EVT_INTERRUPT_DI79 = (ADS_EVT_INTERRUPT_DI0 + 79)

Global Const ADS_EVT_INTERRUPT_DI80 = (ADS_EVT_INTERRUPT_DI0 + 80)
Global Const ADS_EVT_INTERRUPT_DI81 = (ADS_EVT_INTERRUPT_DI0 + 81)
Global Const ADS_EVT_INTERRUPT_DI82 = (ADS_EVT_INTERRUPT_DI0 + 82)
Global Const ADS_EVT_INTERRUPT_DI83 = (ADS_EVT_INTERRUPT_DI0 + 83)
Global Const ADS_EVT_INTERRUPT_DI84 = (ADS_EVT_INTERRUPT_DI0 + 84)
Global Const ADS_EVT_INTERRUPT_DI85 = (ADS_EVT_INTERRUPT_DI0 + 85)
Global Const ADS_EVT_INTERRUPT_DI86 = (ADS_EVT_INTERRUPT_DI0 + 86)
Global Const ADS_EVT_INTERRUPT_DI87 = (ADS_EVT_INTERRUPT_DI0 + 87)

Global Const ADS_EVT_INTERRUPT_DI88 = (ADS_EVT_INTERRUPT_DI0 + 88)
Global Const ADS_EVT_INTERRUPT_DI89 = (ADS_EVT_INTERRUPT_DI0 + 89)
Global Const ADS_EVT_INTERRUPT_DI90 = (ADS_EVT_INTERRUPT_DI0 + 90)
Global Const ADS_EVT_INTERRUPT_DI91 = (ADS_EVT_INTERRUPT_DI0 + 91)
Global Const ADS_EVT_INTERRUPT_DI92 = (ADS_EVT_INTERRUPT_DI0 + 92)
Global Const ADS_EVT_INTERRUPT_DI93 = (ADS_EVT_INTERRUPT_DI0 + 93)
Global Const ADS_EVT_INTERRUPT_DI94 = (ADS_EVT_INTERRUPT_DI0 + 94)
Global Const ADS_EVT_INTERRUPT_DI95 = (ADS_EVT_INTERRUPT_DI0 + 95)

Global Const ADS_EVT_INTERRUPT_DI96 = (ADS_EVT_INTERRUPT_DI0 + 96)
Global Const ADS_EVT_INTERRUPT_DI97 = (ADS_EVT_INTERRUPT_DI0 + 97)
Global Const ADS_EVT_INTERRUPT_DI98 = (ADS_EVT_INTERRUPT_DI0 + 98)
Global Const ADS_EVT_INTERRUPT_DI99 = (ADS_EVT_INTERRUPT_DI0 + 99)
Global Const ADS_EVT_INTERRUPT_DI100 = (ADS_EVT_INTERRUPT_DI0 + 100)
Global Const ADS_EVT_INTERRUPT_DI101 = (ADS_EVT_INTERRUPT_DI0 + 101)
Global Const ADS_EVT_INTERRUPT_DI102 = (ADS_EVT_INTERRUPT_DI0 + 102)
Global Const ADS_EVT_INTERRUPT_DI103 = (ADS_EVT_INTERRUPT_DI0 + 103)

Global Const ADS_EVT_INTERRUPT_DI104 = (ADS_EVT_INTERRUPT_DI0 + 104)
Global Const ADS_EVT_INTERRUPT_DI105 = (ADS_EVT_INTERRUPT_DI0 + 105)
Global Const ADS_EVT_INTERRUPT_DI106 = (ADS_EVT_INTERRUPT_DI0 + 106)
Global Const ADS_EVT_INTERRUPT_DI107 = (ADS_EVT_INTERRUPT_DI0 + 107)
Global Const ADS_EVT_INTERRUPT_DI108 = (ADS_EVT_INTERRUPT_DI0 + 108)
Global Const ADS_EVT_INTERRUPT_DI109 = (ADS_EVT_INTERRUPT_DI0 + 109)
Global Const ADS_EVT_INTERRUPT_DI110 = (ADS_EVT_INTERRUPT_DI0 + 110)
Global Const ADS_EVT_INTERRUPT_DI111 = (ADS_EVT_INTERRUPT_DI0 + 111)

Global Const ADS_EVT_INTERRUPT_DI112 = (ADS_EVT_INTERRUPT_DI0 + 112)
Global Const ADS_EVT_INTERRUPT_DI113 = (ADS_EVT_INTERRUPT_DI0 + 113)
Global Const ADS_EVT_INTERRUPT_DI114 = (ADS_EVT_INTERRUPT_DI0 + 114)
Global Const ADS_EVT_INTERRUPT_DI115 = (ADS_EVT_INTERRUPT_DI0 + 115)
Global Const ADS_EVT_INTERRUPT_DI116 = (ADS_EVT_INTERRUPT_DI0 + 116)
Global Const ADS_EVT_INTERRUPT_DI117 = (ADS_EVT_INTERRUPT_DI0 + 117)
Global Const ADS_EVT_INTERRUPT_DI118 = (ADS_EVT_INTERRUPT_DI0 + 118)
Global Const ADS_EVT_INTERRUPT_DI119 = (ADS_EVT_INTERRUPT_DI0 + 119)

Global Const ADS_EVT_INTERRUPT_DI120 = (ADS_EVT_INTERRUPT_DI0 + 120)
Global Const ADS_EVT_INTERRUPT_DI121 = (ADS_EVT_INTERRUPT_DI0 + 121)
Global Const ADS_EVT_INTERRUPT_DI122 = (ADS_EVT_INTERRUPT_DI0 + 122)
Global Const ADS_EVT_INTERRUPT_DI123 = (ADS_EVT_INTERRUPT_DI0 + 123)
Global Const ADS_EVT_INTERRUPT_DI124 = (ADS_EVT_INTERRUPT_DI0 + 124)
Global Const ADS_EVT_INTERRUPT_DI125 = (ADS_EVT_INTERRUPT_DI0 + 125)
Global Const ADS_EVT_INTERRUPT_DI126 = (ADS_EVT_INTERRUPT_DI0 + 126)
Global Const ADS_EVT_INTERRUPT_DI127 = (ADS_EVT_INTERRUPT_DI0 + 127)
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\2.2///////////////////////////////////

Global Const ADS_EVT_INTERRUPT_DI0_NAME = "ADS_EVT_INTERRUPT_DI0"
Global Const ADS_EVT_INTERRUPT_DI1_NAME = "ADS_EVT_INTERRUPT_DI1"
Global Const ADS_EVT_INTERRUPT_DI2_NAME = "ADS_EVT_INTERRUPT_DI2"
Global Const ADS_EVT_INTERRUPT_DI3_NAME = "ADS_EVT_INTERRUPT_DI3"
Global Const ADS_EVT_INTERRUPT_DI4_NAME = "ADS_EVT_INTERRUPT_DI4"
Global Const ADS_EVT_INTERRUPT_DI5_NAME = "ADS_EVT_INTERRUPT_DI5"
Global Const ADS_EVT_INTERRUPT_DI6_NAME = "ADS_EVT_INTERRUPT_DI6"
Global Const ADS_EVT_INTERRUPT_DI7_NAME = "ADS_EVT_INTERRUPT_DI7"

' sub group 0x3400 ~ 0x37ff for General IDI Event ID
Global Const ADS_EVT_INTERRUPT_IDI0 = &H3400
Global Const ADS_EVT_INTERRUPT_IDI1 = (ADS_EVT_INTERRUPT_IDI0 + 1)
Global Const ADS_EVT_INTERRUPT_IDI2 = (ADS_EVT_INTERRUPT_IDI0 + 2)
Global Const ADS_EVT_INTERRUPT_IDI3 = (ADS_EVT_INTERRUPT_IDI0 + 3)
Global Const ADS_EVT_INTERRUPT_IDI4 = (ADS_EVT_INTERRUPT_IDI0 + 4)
Global Const ADS_EVT_INTERRUPT_IDI5 = (ADS_EVT_INTERRUPT_IDI0 + 5)
Global Const ADS_EVT_INTERRUPT_IDI6 = (ADS_EVT_INTERRUPT_IDI0 + 6)
Global Const ADS_EVT_INTERRUPT_IDI7 = (ADS_EVT_INTERRUPT_IDI0 + 7)

Global Const ADS_EVT_INTERRUPT_IDI16 = (ADS_EVT_INTERRUPT_IDI0 + 16)
Global Const ADS_EVT_INTERRUPT_IDI17 = (ADS_EVT_INTERRUPT_IDI0 + 17)

Global Const ADS_EVT_INTERRUPT_IDI0_NAME = "ADS_EVT_INTERRUPT_IDI0"
Global Const ADS_EVT_INTERRUPT_IDI1_NAME = "ADS_EVT_INTERRUPT_IDI1"
Global Const ADS_EVT_INTERRUPT_IDI2_NAME = "ADS_EVT_INTERRUPT_IDI2"
Global Const ADS_EVT_INTERRUPT_IDI3_NAME = "ADS_EVT_INTERRUPT_IDI3"
Global Const ADS_EVT_INTERRUPT_IDI4_NAME = "ADS_EVT_INTERRUPT_IDI4"
Global Const ADS_EVT_INTERRUPT_IDI5_NAME = "ADS_EVT_INTERRUPT_IDI5"
Global Const ADS_EVT_INTERRUPT_IDI6_NAME = "ADS_EVT_INTERRUPT_IDI6"
Global Const ADS_EVT_INTERRUPT_IDI7_NAME = "ADS_EVT_INTERRUPT_IDI7"
Global Const ADS_EVT_INTERRUPT_IDI16_NAME = "ADS_EVT_INTERRUPT_IDI16"
Global Const ADS_EVT_INTERRUPT_IDI17_NAME = "ADS_EVT_INTERRUPT_IDI17"

Global Const ADS_EVT_DI_INTERRUPT0 = &H3400
Global Const ADS_EVT_DI_INTERRUPT1 = (ADS_EVT_DI_INTERRUPT0 + 1)
Global Const ADS_EVT_DI_INTERRUPT2 = (ADS_EVT_DI_INTERRUPT0 + 2)
Global Const ADS_EVT_DI_INTERRUPT3 = (ADS_EVT_DI_INTERRUPT0 + 3)
Global Const ADS_EVT_DI_INTERRUPT4 = (ADS_EVT_DI_INTERRUPT0 + 4)
Global Const ADS_EVT_DI_INTERRUPT5 = (ADS_EVT_DI_INTERRUPT0 + 5)
Global Const ADS_EVT_DI_INTERRUPT6 = (ADS_EVT_DI_INTERRUPT0 + 6)
Global Const ADS_EVT_DI_INTERRUPT7 = (ADS_EVT_DI_INTERRUPT0 + 7)
Global Const ADS_EVT_DI_INTERRUPT8 = (ADS_EVT_DI_INTERRUPT0 + 8)
Global Const ADS_EVT_DI_INTERRUPT9 = (ADS_EVT_DI_INTERRUPT0 + 9)
Global Const ADS_EVT_DI_INTERRUPT10 = (ADS_EVT_DI_INTERRUPT0 + 10)
Global Const ADS_EVT_DI_INTERRUPT11 = (ADS_EVT_DI_INTERRUPT0 + 11)
Global Const ADS_EVT_DI_INTERRUPT12 = (ADS_EVT_DI_INTERRUPT0 + 12)
Global Const ADS_EVT_DI_INTERRUPT13 = (ADS_EVT_DI_INTERRUPT0 + 13)
Global Const ADS_EVT_DI_INTERRUPT14 = (ADS_EVT_DI_INTERRUPT0 + 14)
Global Const ADS_EVT_DI_INTERRUPT15 = (ADS_EVT_DI_INTERRUPT0 + 15)
Global Const ADS_EVT_DI_INTERRUPT16 = (ADS_EVT_DI_INTERRUPT0 + 16)
Global Const ADS_EVT_DI_INTERRUPT17 = (ADS_EVT_DI_INTERRUPT0 + 17)
Global Const ADS_EVT_DI_INTERRUPT18 = (ADS_EVT_DI_INTERRUPT0 + 18)
Global Const ADS_EVT_DI_INTERRUPT19 = (ADS_EVT_DI_INTERRUPT0 + 19)
Global Const ADS_EVT_DI_INTERRUPT20 = (ADS_EVT_DI_INTERRUPT0 + 20)
Global Const ADS_EVT_DI_INTERRUPT21 = (ADS_EVT_DI_INTERRUPT0 + 21)
Global Const ADS_EVT_DI_INTERRUPT22 = (ADS_EVT_DI_INTERRUPT0 + 22)
Global Const ADS_EVT_DI_INTERRUPT23 = (ADS_EVT_DI_INTERRUPT0 + 23)
Global Const ADS_EVT_DI_INTERRUPT24 = (ADS_EVT_DI_INTERRUPT0 + 24)
Global Const ADS_EVT_DI_INTERRUPT25 = (ADS_EVT_DI_INTERRUPT0 + 25)
Global Const ADS_EVT_DI_INTERRUPT26 = (ADS_EVT_DI_INTERRUPT0 + 26)
Global Const ADS_EVT_DI_INTERRUPT27 = (ADS_EVT_DI_INTERRUPT0 + 27)
Global Const ADS_EVT_DI_INTERRUPT28 = (ADS_EVT_DI_INTERRUPT0 + 28)
Global Const ADS_EVT_DI_INTERRUPT29 = (ADS_EVT_DI_INTERRUPT0 + 29)
Global Const ADS_EVT_DI_INTERRUPT30 = (ADS_EVT_DI_INTERRUPT0 + 30)
Global Const ADS_EVT_DI_INTERRUPT31 = (ADS_EVT_DI_INTERRUPT0 + 31)
Global Const ADS_EVT_DI_INTERRUPT32 = (ADS_EVT_DI_INTERRUPT0 + 32)
Global Const ADS_EVT_DI_INTERRUPT33 = (ADS_EVT_DI_INTERRUPT0 + 33)
Global Const ADS_EVT_DI_INTERRUPT34 = (ADS_EVT_DI_INTERRUPT0 + 34)
Global Const ADS_EVT_DI_INTERRUPT35 = (ADS_EVT_DI_INTERRUPT0 + 35)
Global Const ADS_EVT_DI_INTERRUPT36 = (ADS_EVT_DI_INTERRUPT0 + 36)
Global Const ADS_EVT_DI_INTERRUPT37 = (ADS_EVT_DI_INTERRUPT0 + 37)
Global Const ADS_EVT_DI_INTERRUPT38 = (ADS_EVT_DI_INTERRUPT0 + 38)
Global Const ADS_EVT_DI_INTERRUPT39 = (ADS_EVT_DI_INTERRUPT0 + 39)
Global Const ADS_EVT_DI_INTERRUPT40 = (ADS_EVT_DI_INTERRUPT0 + 40)
Global Const ADS_EVT_DI_INTERRUPT41 = (ADS_EVT_DI_INTERRUPT0 + 41)
Global Const ADS_EVT_DI_INTERRUPT42 = (ADS_EVT_DI_INTERRUPT0 + 42)
Global Const ADS_EVT_DI_INTERRUPT43 = (ADS_EVT_DI_INTERRUPT0 + 43)
Global Const ADS_EVT_DI_INTERRUPT44 = (ADS_EVT_DI_INTERRUPT0 + 44)
Global Const ADS_EVT_DI_INTERRUPT45 = (ADS_EVT_DI_INTERRUPT0 + 45)
Global Const ADS_EVT_DI_INTERRUPT46 = (ADS_EVT_DI_INTERRUPT0 + 46)
Global Const ADS_EVT_DI_INTERRUPT47 = (ADS_EVT_DI_INTERRUPT0 + 47)
Global Const ADS_EVT_DI_INTERRUPT48 = (ADS_EVT_DI_INTERRUPT0 + 48)
Global Const ADS_EVT_DI_INTERRUPT49 = (ADS_EVT_DI_INTERRUPT0 + 49)
Global Const ADS_EVT_DI_INTERRUPT50 = (ADS_EVT_DI_INTERRUPT0 + 50)
Global Const ADS_EVT_DI_INTERRUPT51 = (ADS_EVT_DI_INTERRUPT0 + 51)
Global Const ADS_EVT_DI_INTERRUPT52 = (ADS_EVT_DI_INTERRUPT0 + 52)
Global Const ADS_EVT_DI_INTERRUPT53 = (ADS_EVT_DI_INTERRUPT0 + 53)
Global Const ADS_EVT_DI_INTERRUPT54 = (ADS_EVT_DI_INTERRUPT0 + 54)
Global Const ADS_EVT_DI_INTERRUPT55 = (ADS_EVT_DI_INTERRUPT0 + 55)
Global Const ADS_EVT_DI_INTERRUPT56 = (ADS_EVT_DI_INTERRUPT0 + 56)
Global Const ADS_EVT_DI_INTERRUPT57 = (ADS_EVT_DI_INTERRUPT0 + 57)
Global Const ADS_EVT_DI_INTERRUPT58 = (ADS_EVT_DI_INTERRUPT0 + 58)
Global Const ADS_EVT_DI_INTERRUPT59 = (ADS_EVT_DI_INTERRUPT0 + 59)
Global Const ADS_EVT_DI_INTERRUPT60 = (ADS_EVT_DI_INTERRUPT0 + 60)
Global Const ADS_EVT_DI_INTERRUPT61 = (ADS_EVT_DI_INTERRUPT0 + 61)
Global Const ADS_EVT_DI_INTERRUPT62 = (ADS_EVT_DI_INTERRUPT0 + 62)
Global Const ADS_EVT_DI_INTERRUPT63 = (ADS_EVT_DI_INTERRUPT0 + 63)
Global Const ADS_EVT_DI_INTERRUPT64 = (ADS_EVT_DI_INTERRUPT0 + 64)
Global Const ADS_EVT_DI_INTERRUPT65 = (ADS_EVT_DI_INTERRUPT0 + 65)
Global Const ADS_EVT_DI_INTERRUPT66 = (ADS_EVT_DI_INTERRUPT0 + 66)
Global Const ADS_EVT_DI_INTERRUPT67 = (ADS_EVT_DI_INTERRUPT0 + 67)
Global Const ADS_EVT_DI_INTERRUPT68 = (ADS_EVT_DI_INTERRUPT0 + 68)
Global Const ADS_EVT_DI_INTERRUPT69 = (ADS_EVT_DI_INTERRUPT0 + 69)
Global Const ADS_EVT_DI_INTERRUPT70 = (ADS_EVT_DI_INTERRUPT0 + 70)
Global Const ADS_EVT_DI_INTERRUPT71 = (ADS_EVT_DI_INTERRUPT0 + 71)
Global Const ADS_EVT_DI_INTERRUPT72 = (ADS_EVT_DI_INTERRUPT0 + 72)
Global Const ADS_EVT_DI_INTERRUPT73 = (ADS_EVT_DI_INTERRUPT0 + 73)
Global Const ADS_EVT_DI_INTERRUPT74 = (ADS_EVT_DI_INTERRUPT0 + 74)
Global Const ADS_EVT_DI_INTERRUPT75 = (ADS_EVT_DI_INTERRUPT0 + 75)
Global Const ADS_EVT_DI_INTERRUPT76 = (ADS_EVT_DI_INTERRUPT0 + 76)
Global Const ADS_EVT_DI_INTERRUPT77 = (ADS_EVT_DI_INTERRUPT0 + 77)
Global Const ADS_EVT_DI_INTERRUPT78 = (ADS_EVT_DI_INTERRUPT0 + 78)
Global Const ADS_EVT_DI_INTERRUPT79 = (ADS_EVT_DI_INTERRUPT0 + 79)
Global Const ADS_EVT_DI_INTERRUPT80 = (ADS_EVT_DI_INTERRUPT0 + 80)
Global Const ADS_EVT_DI_INTERRUPT81 = (ADS_EVT_DI_INTERRUPT0 + 81)
Global Const ADS_EVT_DI_INTERRUPT82 = (ADS_EVT_DI_INTERRUPT0 + 82)
Global Const ADS_EVT_DI_INTERRUPT83 = (ADS_EVT_DI_INTERRUPT0 + 83)
Global Const ADS_EVT_DI_INTERRUPT84 = (ADS_EVT_DI_INTERRUPT0 + 84)
Global Const ADS_EVT_DI_INTERRUPT85 = (ADS_EVT_DI_INTERRUPT0 + 85)
Global Const ADS_EVT_DI_INTERRUPT86 = (ADS_EVT_DI_INTERRUPT0 + 86)
Global Const ADS_EVT_DI_INTERRUPT87 = (ADS_EVT_DI_INTERRUPT0 + 87)
Global Const ADS_EVT_DI_INTERRUPT88 = (ADS_EVT_DI_INTERRUPT0 + 88)
Global Const ADS_EVT_DI_INTERRUPT89 = (ADS_EVT_DI_INTERRUPT0 + 89)
Global Const ADS_EVT_DI_INTERRUPT90 = (ADS_EVT_DI_INTERRUPT0 + 90)
Global Const ADS_EVT_DI_INTERRUPT91 = (ADS_EVT_DI_INTERRUPT0 + 91)
Global Const ADS_EVT_DI_INTERRUPT92 = (ADS_EVT_DI_INTERRUPT0 + 92)
Global Const ADS_EVT_DI_INTERRUPT93 = (ADS_EVT_DI_INTERRUPT0 + 93)
Global Const ADS_EVT_DI_INTERRUPT94 = (ADS_EVT_DI_INTERRUPT0 + 94)
Global Const ADS_EVT_DI_INTERRUPT95 = (ADS_EVT_DI_INTERRUPT0 + 95)
Global Const ADS_EVT_DI_INTERRUPT96 = (ADS_EVT_DI_INTERRUPT0 + 96)
Global Const ADS_EVT_DI_INTERRUPT97 = (ADS_EVT_DI_INTERRUPT0 + 97)
Global Const ADS_EVT_DI_INTERRUPT98 = (ADS_EVT_DI_INTERRUPT0 + 98)
Global Const ADS_EVT_DI_INTERRUPT99 = (ADS_EVT_DI_INTERRUPT0 + 99)
Global Const ADS_EVT_DI_INTERRUPT100 = (ADS_EVT_DI_INTERRUPT0 + 100)
Global Const ADS_EVT_DI_INTERRUPT101 = (ADS_EVT_DI_INTERRUPT0 + 101)
Global Const ADS_EVT_DI_INTERRUPT102 = (ADS_EVT_DI_INTERRUPT0 + 102)
Global Const ADS_EVT_DI_INTERRUPT103 = (ADS_EVT_DI_INTERRUPT0 + 103)
Global Const ADS_EVT_DI_INTERRUPT104 = (ADS_EVT_DI_INTERRUPT0 + 104)
Global Const ADS_EVT_DI_INTERRUPT105 = (ADS_EVT_DI_INTERRUPT0 + 105)
Global Const ADS_EVT_DI_INTERRUPT106 = (ADS_EVT_DI_INTERRUPT0 + 106)
Global Const ADS_EVT_DI_INTERRUPT107 = (ADS_EVT_DI_INTERRUPT0 + 107)
Global Const ADS_EVT_DI_INTERRUPT108 = (ADS_EVT_DI_INTERRUPT0 + 108)
Global Const ADS_EVT_DI_INTERRUPT109 = (ADS_EVT_DI_INTERRUPT0 + 109)
Global Const ADS_EVT_DI_INTERRUPT110 = (ADS_EVT_DI_INTERRUPT0 + 110)
Global Const ADS_EVT_DI_INTERRUPT111 = (ADS_EVT_DI_INTERRUPT0 + 111)
Global Const ADS_EVT_DI_INTERRUPT112 = (ADS_EVT_DI_INTERRUPT0 + 112)
Global Const ADS_EVT_DI_INTERRUPT113 = (ADS_EVT_DI_INTERRUPT0 + 113)
Global Const ADS_EVT_DI_INTERRUPT114 = (ADS_EVT_DI_INTERRUPT0 + 114)
Global Const ADS_EVT_DI_INTERRUPT115 = (ADS_EVT_DI_INTERRUPT0 + 115)
Global Const ADS_EVT_DI_INTERRUPT116 = (ADS_EVT_DI_INTERRUPT0 + 116)
Global Const ADS_EVT_DI_INTERRUPT117 = (ADS_EVT_DI_INTERRUPT0 + 117)
Global Const ADS_EVT_DI_INTERRUPT118 = (ADS_EVT_DI_INTERRUPT0 + 118)
Global Const ADS_EVT_DI_INTERRUPT119 = (ADS_EVT_DI_INTERRUPT0 + 119)
Global Const ADS_EVT_DI_INTERRUPT120 = (ADS_EVT_DI_INTERRUPT0 + 120)
Global Const ADS_EVT_DI_INTERRUPT121 = (ADS_EVT_DI_INTERRUPT0 + 121)
Global Const ADS_EVT_DI_INTERRUPT122 = (ADS_EVT_DI_INTERRUPT0 + 122)
Global Const ADS_EVT_DI_INTERRUPT123 = (ADS_EVT_DI_INTERRUPT0 + 123)
Global Const ADS_EVT_DI_INTERRUPT124 = (ADS_EVT_DI_INTERRUPT0 + 124)
Global Const ADS_EVT_DI_INTERRUPT125 = (ADS_EVT_DI_INTERRUPT0 + 125)
Global Const ADS_EVT_DI_INTERRUPT126 = (ADS_EVT_DI_INTERRUPT0 + 126)
Global Const ADS_EVT_DI_INTERRUPT127 = (ADS_EVT_DI_INTERRUPT0 + 127)

Global Const ADS_EVT_DI_INTERRUPT136 = (ADS_EVT_DI_INTERRUPT0 + 136)

Global Const ADS_EVT_DI_INTERRUPT160 = (ADS_EVT_DI_INTERRUPT0 + 160)

Global Const ADS_EVT_DI_INTERRUPT184 = (ADS_EVT_DI_INTERRUPT0 + 184)


' sub group 0x38000 ~ 0x3fff for DI General ID
Global Const ADS_EVT_FIFO_OVERFLOW_DI = &H3800
Global Const ADS_EVT_FIFO_UNDERFLOW_DI = &H3801
Global Const ADS_EVT_BUFFER1_FULL_DI = &H3802
Global Const ADS_EVT_BUFFER2_FULL_DI = &H3803
'/////////////////// V2.0C \\\\\\\\\\\\\\\\\
Global Const ADS_EVT_DI_LOBUFREADY = &H3804
Global Const ADS_EVT_DI_HIBUFREADY = &H3805
Global Const ADS_EVT_DI_TERMINATED = &H3810
Global Const ADS_EVT_DI_OVERRUN = &H3811
Global Const ADS_EVT_DI_PATTERNMATCH = &H3812
Global Const ADS_EVT_DI_STATUSCHANGE = &H3813
'/////////////////// V2.0C \\\\\\\\\\\\\\\\\

'New Event ID for DI Pattern Match. Max 32 ports.
Global Const ADS_EVT_DI_PATTERNMATCH_PORT0 = &H3814
Global Const ADS_EVT_DI_PATTERNMATCH_PORT12 = (ADS_EVT_DI_PATTERNMATCH_PORT0 + 12)
Global Const ADS_EVT_DI_PATTERNMATCH_PORT31 = (ADS_EVT_DI_PATTERNMATCH_PORT0 + 31)

Global Const ADS_EVT_DI_STATUSCHANGE_PORT0 = &H3834
Global Const ADS_EVT_DI_STATUSCHANGE_PORT1 = (ADS_EVT_DI_STATUSCHANGE_PORT0 + 1)
Global Const ADS_EVT_DI_STATUSCHANGE_PORT13 = (ADS_EVT_DI_STATUSCHANGE_PORT0 + 13)
Global Const ADS_EVT_DI_STATUSCHANGE_PORT31 = (ADS_EVT_DI_STATUSCHANGE_PORT0 + 31)
            
Global Const ADS_EVT_FIFO_OVERFLOW_DI_NAME = "ADS_EVT_FIFO_OVERFLOW_DI"
Global Const ADS_EVT_FIFO_UNDERFLOW_DI_NAME = "ADS_EVT_FIFO_UNDERFLOW_DI"
Global Const ADS_EVT_BUFFER1_FULL_DI_NAME = "ADS_EVT_BUFFER1_FULL_DI"
Global Const ADS_EVT_BUFFER2_FULL_DI_NAME = "ADS_EVT_BUFFER2_FULL_DI"
'/////////////////// V2.0C \\\\\\\\\\\\\\\\\
Global Const ADS_EVT_DI_LOBUFREADY_NAME = "ADS_EVT_DI_LOBUFREADY"
Global Const ADS_EVT_DI_HIBUFREADY_NAME = "ADS_EVT_DI_HIBUFREADY"
Global Const ADS_EVT_DI_TERMINATED_NAME = "ADS_EVT_DI_TERMINATED"
Global Const ADS_EVT_DI_OVERRUN_NAME = "ADS_EVT_DI_OVERRUN"
Global Const ADS_EVT_DI_PATTERNMATCH_NAME = "ADS_EVT_DI_PATTERNMATCH"
Global Const ADS_EVT_DI_STATUSCHANGE_NAME = "ADS_EVT_DI_STATUSCHANGE"
'/////////////////// V2.0C \\\\\\\\\\\\\\\\\

' ----------------------------------
' 0x4000 ~ 0x4fff for DO Group
' ----------------------------------
' sub group 0x4000 ~ 0x47ff for DO General ID
                                                 
' sub group 0x4800 ~ 0x4fff for DO others ID
Global Const ADS_EVT_FIFO_OVERFLOW_DO = &H4800
Global Const ADS_EVT_FIFO_UNDERFLOW_DO = &H4801
Global Const ADS_EVT_BUFFER1_EMPTY_DO = &H4802
Global Const ADS_EVT_BUFFER2_EMPTY_DO = &H4803
'/////////////////// V2.0C \\\\\\\\\\\\\\\\\
Global Const ADS_EVT_DO_LOBUFTRANS = &H4804
Global Const ADS_EVT_DO_HIBUFTRANS = &H4805
Global Const ADS_EVT_DO_TERMINATED = &H4810
Global Const ADS_EVT_DO_UNDERRUN = &H4811
'/////////////////// V2.0C \\\\\\\\\\\\\\\\\
                                                                                         
Global Const ADS_EVT_FIFO_OVERFLOW_DO_NAME = "ADS_EVT_FIFO_OVERFLOW_DO"
Global Const ADS_EVT_FIFO_UNDERFLOW_DO_NAME = "ADS_EVT_FIFO_UNDERFLOW_DO"
Global Const ADS_EVT_BUFFER1_EMPTY_DO_NAME = "ADS_EVT_BUFFER1_EMPTY_DO"
Global Const ADS_EVT_BUFFER2_EMPTY_DO_NAME = "ADS_EVT_BUFFER2_EMPTY_DO"
'/////////////////// V2.0C \\\\\\\\\\\\\\\\\
Global Const ADS_EVT_DO_LOBUFTRANS_NAME = "ADS_EVT_DO_LOBUFTRANS"
Global Const ADS_EVT_DO_HIBUFTRANS_NAME = "ADS_EVT_DO_HIBUFTRANS"
Global Const ADS_EVT_DO_TERMINATED_NAME = "ADS_EVT_DO_TERMINATED"
Global Const ADS_EVT_DO_UNDERRUN_NAME = "ADS_EVT_DO_UNDERRUN"
'/////////////////// V2.0C \\\\\\\\\\\\\\\\\
        
                                                 
' ---------------------------------------
' 0x5000 ~ 0x5fff for Counter/Timer
' ---------------------------------------
' sub group 0x5000 ~ 0x57ff for Counter/Timer genral ID
Global Const ADS_EVT_TERMINATE_CNT0 = &H5000
Global Const ADS_EVT_TERMINATE_CNT1 = (ADS_EVT_TERMINATE_CNT0 + 1)
Global Const ADS_EVT_TERMINATE_CNT2 = (ADS_EVT_TERMINATE_CNT0 + 2)
Global Const ADS_EVT_TERMINATE_CNT3 = (ADS_EVT_TERMINATE_CNT0 + 3)
Global Const ADS_EVT_TERMINATE_CNT4 = (ADS_EVT_TERMINATE_CNT0 + 4)
Global Const ADS_EVT_TERMINATE_CNT5 = (ADS_EVT_TERMINATE_CNT0 + 5)
Global Const ADS_EVT_TERMINATE_CNT6 = (ADS_EVT_TERMINATE_CNT0 + 6)
Global Const ADS_EVT_TERMINATE_CNT7 = (ADS_EVT_TERMINATE_CNT0 + 7)
            
Global Const ADS_EVT_TERMINATE_CNT0_NAME = "ADS_EVT_TERMINATE_CNT0"
Global Const ADS_EVT_TERMINATE_CNT1_NAME = "ADS_EVT_TERMINATE_CNT1"
Global Const ADS_EVT_TERMINATE_CNT2_NAME = "ADS_EVT_TERMINATE_CNT2"
Global Const ADS_EVT_TERMINATE_CNT3_NAME = "ADS_EVT_TERMINATE_CNT3"
Global Const ADS_EVT_TERMINATE_CNT4_NAME = "ADS_EVT_TERMINATE_CNT4"
Global Const ADS_EVT_TERMINATE_CNT5_NAME = "ADS_EVT_TERMINATE_CNT5"
Global Const ADS_EVT_TERMINATE_CNT6_NAME = "ADS_EVT_TERMINATE_CNT6"
Global Const ADS_EVT_TERMINATE_CNT7_NAME = "ADS_EVT_TERMINATE_CNT7"
 
' sub group 0x5100 ~ 0x51ff for counter overflow Event ID
Global Const ADS_EVT_OVERFLOW_CNT0 = &H5100
Global Const ADS_EVT_OVERFLOW_CNT1 = (ADS_EVT_OVERFLOW_CNT0 + 1)
Global Const ADS_EVT_OVERFLOW_CNT2 = (ADS_EVT_OVERFLOW_CNT0 + 2)
Global Const ADS_EVT_OVERFLOW_CNT3 = (ADS_EVT_OVERFLOW_CNT0 + 3)
Global Const ADS_EVT_OVERFLOW_CNT4 = (ADS_EVT_OVERFLOW_CNT0 + 4)
Global Const ADS_EVT_OVERFLOW_CNT5 = (ADS_EVT_OVERFLOW_CNT0 + 5)
Global Const ADS_EVT_OVERFLOW_CNT6 = (ADS_EVT_OVERFLOW_CNT0 + 6)
Global Const ADS_EVT_OVERFLOW_CNT7 = (ADS_EVT_OVERFLOW_CNT0 + 7)
            
Global Const ADS_EVT_OVERFLOW_CNT0_NAME = "ADS_EVT_OVERFLOW_CNT0"
Global Const ADS_EVT_OVERFLOW_CNT1_NAME = "ADS_EVT_OVERFLOW_CNT1"
Global Const ADS_EVT_OVERFLOW_CNT2_NAME = "ADS_EVT_OVERFLOW_CNT2"
Global Const ADS_EVT_OVERFLOW_CNT3_NAME = "ADS_EVT_OVERFLOW_CNT3"
Global Const ADS_EVT_OVERFLOW_CNT4_NAME = "ADS_EVT_OVERFLOW_CNT4"
Global Const ADS_EVT_OVERFLOW_CNT5_NAME = "ADS_EVT_OVERFLOW_CNT5"
Global Const ADS_EVT_OVERFLOW_CNT6_NAME = "ADS_EVT_OVERFLOW_CNT6"
Global Const ADS_EVT_OVERFLOW_CNT7_NAME = "ADS_EVT_OVERFLOW_CNT7"

' sub group 0x5200 ~ 0x52ff for counter underflow Event ID
Global Const ADS_EVT_UNDERFLOW_CNT0 = &H5200
Global Const ADS_EVT_UNDERFLOW_CNT1 = (ADS_EVT_UNDERFLOW_CNT0 + 1)
Global Const ADS_EVT_UNDERFLOW_CNT2 = (ADS_EVT_UNDERFLOW_CNT0 + 2)
Global Const ADS_EVT_UNDERFLOW_CNT3 = (ADS_EVT_UNDERFLOW_CNT0 + 3)
Global Const ADS_EVT_UNDERFLOW_CNT4 = (ADS_EVT_UNDERFLOW_CNT0 + 4)
Global Const ADS_EVT_UNDERFLOW_CNT5 = (ADS_EVT_UNDERFLOW_CNT0 + 5)
Global Const ADS_EVT_UNDERFLOW_CNT6 = (ADS_EVT_UNDERFLOW_CNT0 + 6)
Global Const ADS_EVT_UNDERFLOW_CNT7 = (ADS_EVT_UNDERFLOW_CNT0 + 7)
            
Global Const ADS_EVT_UNDERFLOW_CNT0_NAME = "ADS_EVT_UNDERFLOW_CNT0"
Global Const ADS_EVT_UNDERFLOW_CNT1_NAME = "ADS_EVT_UNDERFLOW_CNT1"
Global Const ADS_EVT_UNDERFLOW_CNT2_NAME = "ADS_EVT_UNDERFLOW_CNT2"
Global Const ADS_EVT_UNDERFLOW_CNT3_NAME = "ADS_EVT_UNDERFLOW_CNT3"
Global Const ADS_EVT_UNDERFLOW_CNT4_NAME = "ADS_EVT_UNDERFLOW_CNT4"
Global Const ADS_EVT_UNDERFLOW_CNT5_NAME = "ADS_EVT_UNDERFLOW_CNT5"
Global Const ADS_EVT_UNDERFLOW_CNT6_NAME = "ADS_EVT_UNDERFLOW_CNT6"
Global Const ADS_EVT_UNDERFLOW_CNT7_NAME = "ADS_EVT_UNDERFLOW_CNT7"

' sub group 0x5300 ~ 0x53ff for counter OVER COMPARE Event ID
Global Const ADS_EVT_OVERCOMPARE_CNT0 = &H5300
Global Const ADS_EVT_OVERCOMPARE_CNT1 = (ADS_EVT_OVERCOMPARE_CNT0 + 1)
Global Const ADS_EVT_OVERCOMPARE_CNT2 = (ADS_EVT_OVERCOMPARE_CNT0 + 2)
Global Const ADS_EVT_OVERCOMPARE_CNT3 = (ADS_EVT_OVERCOMPARE_CNT0 + 3)

Global Const ADS_EVT_OVERCOMPARE_CNT0_NAME = "ADS_EVT_OVERCOMPARE_CNT0"
Global Const ADS_EVT_OVERCOMPARE_CNT1_NAME = "ADS_EVT_OVERCOMPARE_CNT1"
Global Const ADS_EVT_OVERCOMPARE_CNT2_NAME = "ADS_EVT_OVERCOMPARE_CNT2"
Global Const ADS_EVT_OVERCOMPARE_CNT3_NAME = "ADS_EVT_OVERCOMPARE_CNT3"
' sub group 0x5400 ~ 0x54ff for counter UNDER COMPARE Event ID
Global Const ADS_EVT_UNDERCOMPARE_CNT0 = &H5400
Global Const ADS_EVT_UNDERCOMPARE_CNT1 = (ADS_EVT_UNDERCOMPARE_CNT0 + 1)
Global Const ADS_EVT_UNDERCOMPARE_CNT2 = (ADS_EVT_UNDERCOMPARE_CNT0 + 2)
Global Const ADS_EVT_UNDERCOMPARE_CNT3 = (ADS_EVT_UNDERCOMPARE_CNT0 + 3)

Global Const ADS_EVT_UNDERCOMPARE_CNT0_NAME = "ADS_EVT_UNDERCOMPARE_CNT0"
Global Const ADS_EVT_UNDERCOMPARE_CNT1_NAME = "ADS_EVT_UNDERCOMPARE_CNT1"
Global Const ADS_EVT_UNDERCOMPARE_CNT2_NAME = "ADS_EVT_UNDERCOMPARE_CNT2"
Global Const ADS_EVT_UNDERCOMPARE_CNT3_NAME = "ADS_EVT_UNDERCOMPARE_CNT3"

' sub group 0x5500 ~ 0x55ff for GENERAL TIMER Event ID
Global Const ADS_EVT_INTERRUPT_TIMER0 = &H5500
Global Const ADS_EVT_INTERRUPT_TIMER1 = (ADS_EVT_INTERRUPT_TIMER0 + 1)
Global Const ADS_EVT_INTERRUPT_TIMER2 = (ADS_EVT_INTERRUPT_TIMER0 + 2)
Global Const ADS_EVT_INTERRUPT_TIMER3 = (ADS_EVT_INTERRUPT_TIMER0 + 3)
Global Const ADS_EVT_INTERRUPT_TIMER4 = (ADS_EVT_INTERRUPT_TIMER0 + 4)
Global Const ADS_EVT_INTERRUPT_TIMER5 = (ADS_EVT_INTERRUPT_TIMER0 + 5)
Global Const ADS_EVT_INTERRUPT_TIMER6 = (ADS_EVT_INTERRUPT_TIMER0 + 6)
Global Const ADS_EVT_INTERRUPT_TIMER7 = (ADS_EVT_INTERRUPT_TIMER0 + 7)

Global Const ADS_EVT_TC_TIMER = &H5200
            
Global Const ADS_EVT_INTERRUPT_TIMER0_NAME = "ADS_EVT_INTERRUPT_TIMER0"
Global Const ADS_EVT_INTERRUPT_TIMER1_NAME = "ADS_EVT_INTERRUPT_TIMER1"
Global Const ADS_EVT_INTERRUPT_TIMER2_NAME = "ADS_EVT_INTERRUPT_TIMER2"
Global Const ADS_EVT_INTERRUPT_TIMER3_NAME = "ADS_EVT_INTERRUPT_TIMER3"
Global Const ADS_EVT_INTERRUPT_TIMER4_NAME = "ADS_EVT_INTERRUPT_TIMER4"
Global Const ADS_EVT_INTERRUPT_TIMER5_NAME = "ADS_EVT_INTERRUPT_TIMER5"
Global Const ADS_EVT_INTERRUPT_TIMER6_NAME = "ADS_EVT_INTERRUPT_TIMER6"
Global Const ADS_EVT_INTERRUPT_TIMER7_NAME = "ADS_EVT_INTERRUPT_TIMER7"
                                      
Global Const ADS_EVT_TC_TIMER_NAME = "ADS_EVT_TC_TIMER"

' sub group 0x5800 ~ 0x5fff for counter/Timer genral ID
Global Const ADS_EVT_INDEX_CNT0 = &H5800
Global Const ADS_EVT_INDEX_CNT1 = (ADS_EVT_INDEX_CNT0 + 1)
Global Const ADS_EVT_INDEX_CNT2 = (ADS_EVT_INDEX_CNT0 + 2)
Global Const ADS_EVT_INDEX_CNT3 = (ADS_EVT_INDEX_CNT0 + 3)

Global Const ADS_EVT_INDEX_CNT0_NAME = "ADS_EVT_INDEX_CNT0"
Global Const ADS_EVT_INDEX_CNT1_NAME = "ADS_EVT_INDEX_CNT1"
Global Const ADS_EVT_INDEX_CNT2_NAME = "ADS_EVT_INDEX_CNT2"
Global Const ADS_EVT_INDEX_CNT3_NAME = "ADS_EVT_INDEX_CNT3"
' Event closed
Global Const ADS_EVT_DEVICE_CLOSED = &HFFFE

                                                 
